package com.dragon.modules.yuegou.model.coupon;

import com.dragon.modules.yuegou.entity.coupon.CouponTemplateStockEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 优惠券模板库存模型类
 * 
 * @author pbuilder generated
 * @date 2020-06-30 17:39:39
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class CouponTemplateStock extends CouponTemplateStockEntity {

	/**
	 * 构造一个空优惠券模板库存模型对象
	 */
	public CouponTemplateStock(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个优惠券模板库存模型对象
	 * 
	 * @param entity 实体对象
	 */
	public CouponTemplateStock(CouponTemplateStockEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个优惠券模板库存模型对象
	 * 
	 * @param other 其它对象
	 */
	public CouponTemplateStock(CouponTemplateStock other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置优惠券模板ID
	 * 
	 * @param id 优惠券模板ID
	 * @return 当前对象
	 */
    public CouponTemplateStock id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public Integer getStockTotal() {
    	return stockTotal;
    }

    /**
	 * 设置总库存
	 * 
	 * @param stockTotal 总库存
	 * @return 当前对象
	 */
    public CouponTemplateStock stockTotal(Integer stockTotal) {
    	this.stockTotal = stockTotal;
    	return this;
    }

	@Override
	public Integer getStockSurplus() {
    	return stockSurplus;
    }

    /**
	 * 设置库存剩余
	 * 
	 * @param stockSurplus 库存剩余
	 * @return 当前对象
	 */
    public CouponTemplateStock stockSurplus(Integer stockSurplus) {
    	this.stockSurplus = stockSurplus;
    	return this;
    }

	@Override
	public Integer getStockUse() {
    	return stockUse;
    }

    /**
	 * 设置已用库存
	 * 
	 * @param stockUse 已用库存
	 * @return 当前对象
	 */
    public CouponTemplateStock stockUse(Integer stockUse) {
    	this.stockUse = stockUse;
    	return this;
    }

	@Override
	public Integer getSaleTotal() {
    	return saleTotal;
    }

    /**
	 * 设置出售库存总量
	 * 
	 * @param saleTotal 出售库存总量
	 * @return 当前对象
	 */
    public CouponTemplateStock saleTotal(Integer saleTotal) {
    	this.saleTotal = saleTotal;
    	return this;
    }

	@Override
	public Integer getSaleStock() {
    	return saleStock;
    }

    /**
	 * 设置出售库存
	 * 
	 * @param saleStock 出售库存
	 * @return 当前对象
	 */
    public CouponTemplateStock saleStock(Integer saleStock) {
    	this.saleStock = saleStock;
    	return this;
    }

	@Override
	public Integer getGranted() {
    	return granted;
    }

    /**
	 * 设置发放量
	 * 
	 * @param granted 发放量
	 * @return 当前对象
	 */
    public CouponTemplateStock granted(Integer granted) {
    	this.granted = granted;
    	return this;
    }

	@Override
	public Integer getGrantTotal() {
    	return grantTotal;
    }

    /**
	 * 设置发放总库存
	 * 
	 * @param grantTotal 发放总库存
	 * @return 当前对象
	 */
    public CouponTemplateStock grantTotal(Integer grantTotal) {
    	this.grantTotal = grantTotal;
    	return this;
    }

	@Override
	public Integer getGrantStock() {
    	return grantStock;
    }

    /**
	 * 设置发放库存
	 * 
	 * @param grantStock 发放库存
	 * @return 当前对象
	 */
    public CouponTemplateStock grantStock(Integer grantStock) {
    	this.grantStock = grantStock;
    	return this;
    }

	@Override
	public Integer getVersion() {
    	return version;
    }

    /**
	 * 设置版本
	 * 
	 * @param version 版本
	 * @return 当前对象
	 */
    public CouponTemplateStock version(Integer version) {
    	this.version = version;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
    public CouponTemplateStock createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置最后更新时间
	 * 
	 * @param modifiedTime 最后更新时间
	 * @return 当前对象
	 */
    public CouponTemplateStock modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }
}
